package com.ml.mall.entity.coupon;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Data
@TableName(value = "sys_coupon_record")
public class SysCouponRecord implements Serializable {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 创建时间
     */
    @TableField(value = "create_at",fill = FieldFill.INSERT)
    private Date createAt;

    /**
     * 更新时间
     */
    @TableField(value = "update_at",fill = FieldFill.INSERT_UPDATE)
    private Date updateAt;

    /**
     * 是否删除
     */
    @ApiModelProperty(value = "是否删除")
    @TableField(value = "is_delete",fill = FieldFill.INSERT)
    @TableLogic(value = "0",delval = "1")
    private Integer isDelete;

    /**
     * 类别用于商城搜索
     */
    @TableField(value = "coupon_code")
    private String couponCode;

    /**
     * 0：全部；1：卖家；2:目录 3：商品
     */
    @TableField(value = "oid")
    private Long oid;

    /**
     * 使用者
     */
    @TableField(value = "company_id")
    private Long companyId;

    @TableField(value = "supplier_id")
    private Long supplierId; //卖家ID

    /**
     * 金额
     */
    @TableField(value = "reduce_money")
    private BigDecimal reduceMoney;

    private static final long serialVersionUID = 1L;
}